<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var num = +prompt('输入今天星期几');
        switch (num) {
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
                alert("工作日");
                break;
            case 6:
            case 7:
                alert("休息日");
                break;
            default:
                alert("错误");
                break;
        }
    </script>
</head>

<body>

</body>

</html>